home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 5630 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: maths.tcd.ie!not-for-mail
  2. From: dwmalone@maths.tcd.ie (David Malone)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: GCC C++ questions
  5. Date: 17 Mar 1996 23:27:22 -0000
  6. Organization: Dept. of Maths, Trinity College, Dublin, Ireland.
  7. Message-ID: <4ii74q$ss2@hamilton.maths.tcd.ie>
  8. References: <314c6829@usura.metropolis.nl>
  9. NNTP-Posting-Host: hamilton.maths.tcd.ie
  10.  
  11. joskam@usura.metropolis.nl (Jurjen Oskam) writes:
  12.  
  13. >Hello there,
  14.  
  15.  
  16. >#include <iostream.h>
  17.  
  18. >int main()
  19. >{
  20. >   cout << "Hello!" << endl ;
  21. >}
  22.  
  23. >This compiles OK, but the executable is 69KB! A bit too large, IMHO. ;-) I
  24. >understand that GCC uses ixemul.library, and that there is another library
  25. >that's better for programs not ported from UN*X, namely libnix.library. So, how
  26. >do I install libnix.library (the docs say "don't forget to link it")? I don't
  27. >know how to "link" it.
  28.  
  29. That is because by using the iostream stuff, you have got the entire
  30. iostream library, which is nothing to do with either ixemul or libnix,
  31. its a c++ thing. I remember getting the same shock using printf, which
  32. is huge, but once you have it you have it, so you could add another 50
  33.  
  34.     cout << "Wheeee!" << endl;
  35.  
  36. and it shouldn't make too much difference to the size. You could even
  37. do stuff like printing ints, longs, doubles and the like without
  38. any -=futher=- library overhead.
  39.  
  40. I'd add if you are scared of executable sizes then :
  41.  
  42.     1) c++ is not your language.
  43.     2) don't use gcc - its got sevral +1MB executable ;)
  44.  
  45.     David
  46.